{% extends "main.html" %}

{% block title %} 我喜欢的{{type_nick}} - {% endblock %}
{% block keyword %}{{keyword}}{% endblock %}
{% block container %}
<!-- <div class="container-fluid">
    <div class="row">
        <div id="avatar-waterfall" style="margin: 70px 70px;">
        {% for item in data %}
            <a class="avatar-box" href="/stars/{{item.linkid}}" title="{{item.time}}">
                <div class="photo-frame">
                    {% if item.headimg %}
                        <img src="{{cdn}}/{{item.headimg}}" title="">
                    {% else %}
                        <img src="{{cdn}}/mono/actjpgs/nowprinting.gif" title="">
                    {% endif %}
                    </div>
                <span>{{item.name}}</span>
            </a>
        {% endfor %}
        </div>
	</div>
</div> -->
<div class="container-fluid">
    <div class="row">
        <div id="avatar-waterfall" style="margin: 70px 70px;">
            {% for item in data %}
            <div class="avatar-box">
                <a class="" href="/stars/{{item.linkid}}" title="{{item.time}}">
                    <div class="photo-frame">
                        {% if item.headimg %}
                        <img src="{{cdn}}/{{item.headimg}}" title="">
                        {% else %}
                        <img src="{{cdn}}/mono/actjpgs/nowprinting.gif" title="">
                        {% endif %}
                    </div>
                </a>
                <span>{{item.name}}</span>
                <span class="glyphicon glyphicon-remove del-btn" data-val="{{item.linkid}}" style="padding: 2px;color: rgb(255, 127, 7);"></span>
            </div>
            {% endfor %}
        </div>
    </div>
</div>
{% endblock %}

{% block pagination %}
{% endblock %}

{% block javascript %}
<script>
    // $('#avatar-waterfall > div > span').each(function () {
    //     $(this).after('<span class="glyphicon glyphicon-remove del-btn" data-toggle="modal" data-target="#myModal" style="padding: 2px;color: #FFC107;"></span>');
    // });
    $('.del-btn').click(function () {
        $.get("/like/del/stars_url/" + $(this).data('val'), function (data) {
            $('#message_title').html(data);
            $('#message').modal('show');
        });
    });
</script>
{% endblock %}